package com.heyqing.topic.ReverseString_0344;

/**
 * ClassName:ReverseString
 * Package:com.heyqing.topic.ReverseString_0344
 * Description:
 *
 * @Date:2024/9/27
 * @Author:Heyqing
 */
public class ReverseString {
    public void reverseString(char[] s) {
        for (int i = 0; i < s.length / 2; i++) {
            char t = s[s.length - 1 - i];
            s[s.length - 1 - i] = s[i];
            s[i] = t;
        }
    }
}
